//
// Created by Xu Xiao on 2022/9/2.
//
#include <iostream>
#include <cstring>
#include <unordered_map>
#include <algorithm>

using namespace std;

#ifndef ALGORITHM_22_1_SOLUTION0902_H
#define ALGORITHM_22_1_SOLUTION0902_H


class Solution0902 {
public:
    static void A_B_main() {
        int m, n;
        int *a = new int[1000001];
        memset(a, 0, sizeof(a));
        cin >> m >> n;
        int tmp;
        for (int i = 0; i < m; i++) {
            scanf("%d", &tmp);
            a[tmp + 500000] += 1;
        }
        for (int i = 1000001; i >= 0 && n > 0; i--) {
            while (a[i] > 0 && n > 0) {
                cout << i - 500000 << " ";
                a[i]--;
                n--;
            }
        }
    }

    static void C_main() {
        int a[14] = {0, 2, 7, 5, 30, 169, 441, 1872, 7632, 1740, 93313, 459901, 1358657, 2504881};
        int n;
        while (cin >> n) {
            if (n == 0) break;
            else {
                cout << a[n] << endl;
            }
        }
    }

    static void C_simulate() {
        for (int k = 1; k < 15; k++) {
            for (int i = 1;; i++) {
                int sum = 0;
                int total = 2 * k;
                while (k < total) {
                    sum += i;
                    while (sum > total) {
                        sum = sum - total;
                    }
                    if (sum <= k) {
                        break;
                    }
                    if (sum > k && sum <= total) {
                        total--;
                        sum--;
                    }
                }
                if (k == total) {
                    cout << i << ",";
                    break;
                }
            }
        }
    }

    static void D_main() {
        int year;
        while (scanf("%d", &year)) {
            if (year == 0) {
                break;
            }
            int bit = 4;
            for (int i = 0; i < (year - 1960) / 10; i++) {
                bit = bit * 2;
            }
            int index = 1;
            double sum = 0.0;
            while (sum < bit * log(2)) {
                sum += log(index);
                index++;
            }
            index = index - 2;
            cout << index << endl;
        }
    }

    static void E_main() {
        int times;
        cin >> times;
        for (int i = 0; i < times; i++) {
            int maxlen, n;
            cin >> maxlen >> n;
            int minTime = -1, maxTime = -1;
            for (int j = 0; j < n; j++) {
                int tmp;
                cin >> tmp;
                minTime = max(minTime, min(tmp, maxlen - tmp));
                maxTime = max(maxTime, max(tmp, maxlen - tmp));
            }
            cout << minTime << " " << maxTime << endl;
        }
    }

    static void F_main() {
        int times, tmp;
        int ans;
        while (cin >> times >> ans) {
            for (int i = 0; i < times - 1; i++) {
                scanf("%d", &tmp);
                ans = ans ^ tmp;
            }
            if (ans)
                cout << "Yes" << endl;
            else
                cout << "No" << endl;
        }
    }
};


#endif //ALGORITHM_22_1_SOLUTION0902_H
